<template>
  <!-- 胶囊图 -->
  <dv-capsule-chart :config="config" style="width: 100%; height: 200px" />
</template>

<script>
export default {
  props: {
    // 颜色数组
    colorChart: {
      type: Array,
      default: () => [],
    },
    dataChart: {
      type: Array,
      default: () => [
        {
          name: '南阳1',
          value: 167,
        },
        {
          name: '周口1',
          value: 67,
        },
        {
          name: '漯河1',
          value: 123,
        },
        {
          name: '郑州1',
          value: 55,
        },
        {
          name: '西峡1',
          value: 98,
        },
      ],
    },
    // 单位
    unitChart: {
      type: String,
      default: '',
    },
    showValueChart: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      config: {
        data: this.dataChart,
        colors: this.colorChart,
        unit: this.unitChart,
        showValue: this.showValueChart,
      },
    }
  },
}
</script>

<style></style>
